﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="DreamBox.Admin.User.UserList" %>

<%@ Register src="../Controls/PagerUserControl.ascx" tagname="PagerUserControl" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
  <script type="text/javascript" src="/tools/js/jquery-1.9.1.min.js"></script>
 <link href="/style/default/css/style.css" rel="stylesheet" type="text/css" />

    <link href="/style/default/css/tb.css" rel="stylesheet" /> <style type="text/css">
        .MSelectItem{
	        background:#79c7f3;
	        background-color:#79c7f3;
        }
        .MItem
        {
            background:White;
	        background-color:White;
        }
    </style>

 <script type="text/javascript">
     //全选/反选
     function Check(che) {
         var gv = document.getElementById("tablelist");
         for (var i = 2; i < gv.rows.length; i++) {
             gv.rows[i].cells[0].getElementsByTagName("input")[0].checked = che.checked;
         }
     }
     //颜色选项
     function SelectItem(item) {
         $("#" + item.id).attr("class", "MSelectItem");
     }
     function UnSelectItem(item) {
         $("#" + item.id).attr("class", "");
     }
</script>

 
    
</head>
<body class="right_body">
    <form id="form1" runat="server">

 
        <table cellpadding="0" cellspacing="0" border="0" class="table table-bordered" id="tablelist">
           <tr>
                <td colspan="8" class="text-center">
                    发布人：
            <asp:TextBox ID="UserName" runat="server" CssClass="dfinput2"></asp:TextBox>
             <asp:Button ID="btnSelectClassName" runat="server" Text="查询" CssClass="btn" onclick="btnSelectClassName_Click"
                />
                </td>
           </tr>
          <tr>
			<td colspan="8">
                <asp:LinkButton ID="LinkBtnDel" CssClass="btn btn-link" runat="server" 
                    onclick="LinkBtnDelete_Click" OnClientClick="return confirm('确认执行删除操作?')">删除</asp:LinkButton>
                <asp:LinkButton ID="LinkBtnIsStatusFalse" CssClass="btn btn-link" 
                    runat="server" onclick="LinkBtnIsStatusFalse_Click">禁用</asp:LinkButton>
                <asp:LinkButton ID="LinkBtnIsStatusTrue" CssClass="btn btn-link" runat="server" 
                    onclick="LinkBtnIsStatusTrue_Click">取消禁用</asp:LinkButton>
            </td>
			</tr>
			<tr>
				<th>
                    <asp:CheckBox ID="CheckBoxList" runat="server" onclick="Check(this)" ToolTip="选项"/>
               </th>
               <th>邮箱</th>
               <th>用户名</th>
               <th>注册时间</th>
               <th>最后登录</th>
               <th>所在地</th>
               <th>用户组</th>
               <th>状态</th>
			</tr>

             <asp:Repeater ID="RepeaterList" runat="server">
            <ItemTemplate>
			<tr onmouseover="SelectItem(this)"  onmouseout="UnSelectItem(this)" id="Item<%#Eval("UserID") %>" >
				<td>
                    <asp:CheckBox ID="CheckBoxSelect" runat="server" ToolTip='<%#Eval("UserID") %>' />
                </td>
               <td><%#Eval("Email") %></td>
               <td><%#Eval("UserName") %></td>
               <td><%#Eval("RegisterDate") %></td>
               <td><%#Eval("LastLoginDate") %></td>
               <td><%#Eval("Location") %></td>
               <td><%#Eval("GroupName") %></td>
               <td>
                    <%#bool.Parse(Eval("IsStatus").ToString())==false?"禁用":"正常" %>
               </td>
			</tr>
           
            </ItemTemplate>
            </asp:Repeater>
            <tr>
                <td colspan="8" class="pager">
                 <uc1:PagerUserControl ID="PagerList" runat="server" />
                </td>
            </tr>
        </table>
    


    </form>
</body>
</html>
